﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
///OrderDao 的摘要说明
/// </summary>
public class OrderDao
{

	public OrderDao()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    /// <summary>
    /// 插入订单
    /// </summary>
    /// <param></param>
    /// <returns></returns>
    public DataTable FindById(long id)
    {
        SqlConnection conn = SqlHelper.OpenSqlConn();
        SqlCommand cmd = conn.CreateCommand();

        cmd.CommandText = "select of_id,of_orderid,of_cuno from orderOfFees where of_orderid=@of_orderid or of_cuno=@of_cuno ";
        cmd.Parameters.Add("@of_orderid", SqlDbType.NVarChar).Value = id;
        cmd.Parameters.Add("@of_cuno", SqlDbType.NVarChar).Value = id;

        DataTable data = new DataTable();
        SqlDataAdapter adapter = new SqlDataAdapter(cmd);
        adapter.Fill(data);
        SqlHelper.Close();
        return (data);
    }
}